<!DOCTYPE html>
<html>
<head>
    <th:block th:include="include :: headermain('互助保障系统V3')"/>
    <title>业务办理-入会业务-参互情况</title>
    <script src="/plugin/jquery/jquery.min.js"></script>
    <script src="/plugin/jquery/jquery.plugin.js"></script>
    <script src="/plugin/vue/vue.min.js"></script>
    <script src="/plugin/layui/layui.all.js"></script>
    <script src="/unit/resource/js/script.js"></script>
</head>
<body>
<div class="page">
    <!-- 头部信息 -->
    <th:block th:include="include :: top"/>
    <div class="center">
        <div class="page-content page-wrap">
            <!-- 左侧导航 -->
            <th:block th:include="include :: left"/>
            <div class="page-wrap-container">

                <div class="page-account">
                    <div class="page-tab">
                        <a href="/hzpolicy/hzPolicyFront/policySituation">参互情况</a>
                        <a class="on" href="/hzpolicy/hzPolicyFront/policyApply">业务办理</a>
                        <a href="/hzpolicy/hzPolicyFront/policyPerson">职工入会</a>
                    </div>

                    <!-- 办理批次记录查询详情 -->
                    <div class="page-tab-content" style="display: block;">
                        <div style="border-bottom:1px dashed #ddd; padding:20px 0;">
                            <c:forEach items="${stepList}" var="step" varStatus="status">
                                <c:if test="${hzPolicy.stepid == step.id and step.sort < 99}">
                                    <a class="layui-btn  layui-btn-normal" target="_self" href="/hzpolicy/hzPolicyFront/policyPaymentProof?id=${policyInfo.id}">打印付款信息</a>
                                    <c:if test="${step.sort > 1}">
                                        <a class="layui-btn" target="_self" href="/hzpolicy/hzPolicyFront/policyApplyPrint?printType=1&id=${policyInfo.id}">打印申请资料</a>
                                        <a class="layui-btn  layui-btn-normal" target="_self" href="/hzpolicy/hzPolicyFront/policyAgreementPrint?id=${policyInfo.id}">打印请款协议</a>
                                    </c:if>
                                </c:if>
                            </c:forEach>
                            <a class="layui-btn layui-btn-primary" href="javascript:;" onclick="backApply()">返回列表</a>
                        </div>
                        <div class="page-step">
                            <c:forEach items="${stepList}" var="step" varStatus="status">
                                <c:choose>
                                    <c:when test="${onStep.sort > step.sort}">
                                        <span class="complete">${step.name}</span>
                                        <c:if test="${!status.last}"><i class="fa fa-arrow-circle-right complete"></i></c:if>
                                    </c:when>
                                    <c:when test="${hzPolicy.stepid == step.id}">
                                        <span class="current">${step.name}</span>
                                        <c:if test="${!status.last}"><i class="fa fa-arrow-circle-right current"></i></c:if>
                                    </c:when>
                                    <c:otherwise>
                                        <span>${step.name}</span>
                                        <c:if test="${!status.last}"><i class="fa fa-arrow-circle-right"></i></c:if>
                                    </c:otherwise>
                                </c:choose>
                            </c:forEach>
                        </div>
                        <div class="page-info ">
                            <h2>申请信息</h2>
                            <table class="page-table" id="policyDetails">
                                <tr>
                                    <td colspan="4" style="padding:20px;font-size:20px;color:green">
                                        单位入会
                                    </td>
                                </tr>
                                <tr>
                                    <th>申请批次</th>
                                    <td>${policyInfo.policyno}</td>
                                    <th>所属机构</th>
                                    <td>${policyInfo.organizename}</td>
                                </tr>
                                <tr>
                                    <th>联系人</th>
                                    <td>${policyInfo.contact}</td>
                                    <th>联系手机</th>
                                    <td>${policyInfo.mobile}</td>
                                </tr>
                                <tr>
                                    <th>联系电话</th>
                                    <td>${policyInfo.phone}</td>
                                    <th>联系邮箱</th>
                                    <td>${policyInfo.email}</td>
                                </tr>
                                <tr>
                                    <th>总人数</th>
                                    <td>${policyInfo.totalperson}</td>
                                    <th>总金额</th>
                                    <td>${policyInfo.totalamount}</td>
                                </tr>
                                <tr>
                                    <th>会费来源</th>
                                    <td>${fns:getDictLabel(policyInfo.membershipsourceid, "hzxh_membershipsourceid", "")}</td>
                                    <th>付款名称</th>
                                    <td>${policyInfo.paymentname}</td>
                                </tr>
                                <tr>
                                    <th>到款情况</th>
                                    <td>
                                        <c:if test="${policyInfo.payment == 1}">
                                            <span>已到款（${policyInfo.paymentTime}）</span>
                                        </c:if>
                                        <c:if test="${policyInfo.payment == 0}">
                                            <span style="color:red">待打款</span>
                                        </c:if>
                                    </td>
                                    <th>申请材料</th>
                                    <td>
                                        <c:if test="${policyInfo.archive == 1}">
                                            <span style="color:green">已收到资料</span>
                                        </c:if>
                                        <c:if test="${policyInfo.archive == 0}">
                                            <span style="color:red">待邮寄纸质申请资料</span>
                                        </c:if>
                                    </td>
                                </tr>
                            </table>
                            <c:forEach items="${hzPolicyInsurances}" var="hzPolicyInsurance">
                                <h2>
                                    <span>${hzPolicyInsurance.insurancename}</span>
                                    <span style=" font-size:12px;margin-left:20px;">计划书号：${hzPolicyInsurance.insuranceno}</span>
                                </h2>
                                <table class="page-table">
                                    <tr>
                                        <th>入会标准</th>
                                        <td>${hzPolicyInsurance.price}元/人</td>
                                        <th>参加人数</th>
                                        <td>${hzPolicyInsurance.totalperson}人</td>
                                        <th>参加份数</th>
                                        <td>${hzPolicyInsurance.unitqty}份</td>
                                        <th>总金额</th>
                                        <td>${hzPolicyInsurance.totalamount}元</td>
                                    </tr>
                                    <tr>
                                        <th>新增人数</th>
                                        <td>${hzPolicyInsurance.newPersonNum}人</td>
                                        <th>续保人数</th>
                                        <td>${hzPolicyInsurance.renewalPersonNum}人</td>
                                        <th>重新入会人数</th>
                                        <td>${hzPolicyInsurance.renewPersonNum}人</td>
                                        <th>执行观察期</th>
                                        <td>${hzPolicyInsurance.freeday}天</td>
                                    </tr>
                                    <tr>
                                        <th>退休续互人数</th>
                                        <td>${hzPolicyInsurance.retirePersonNum}人</td>
                                        <th>保障期</th>
                                        <td colspan="7">
                                            <c:if test="${policyInfo.complete == 1}">
                                                ${hzPolicyInsurance.startDate}零时 - ${hzPolicyInsurance.endDate}二十四时止
                                            </c:if>
                                        </td>
                                    </tr>
                                </table>
                                <a class="layui-btn layui-btn-sm btn-person" data-id="${hzPolicyInsurance.id}" style="margin-top:8px;">会员花名册</a>
                            </c:forEach>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <!-- 底部信息 -->
    <th:block th:include="include :: footer"/>
</div>

<script type="text/javascript">

    /* 返回列表 */
    function backApply(){
        window.location.href = "/hzpolicy/hzPolicyFront/policyApply";
    }

    /* 会员花名册 */
    $(".btn-person").click(function () {
        $.soon.open({
            url: "/hzpolicy/hzPolicyFront/personRosterData?pageNo=1&pageSize=10&id=" + $(this).attr("data-id"),
            width: "70%",
            height: "80%",
            iframe: true,
            title: "职工列表"
        });
    })
</script>

</body>
</html>
